import React from 'react';

// 导入样式文件
import Styles from './index.module.scss';

// 导入封装的基准路径
import {baseURL} from '../../utils/request'
class HouseItem extends React.Component {
  state = {  }
  render() { 
   const item = this.props.item
    return ( 
      <div>
        <div className={Styles.houselist_item}>
      <div className={Styles.houselist_img}>
        <img src={baseURL + item.houseImg} alt=""/>
      </div>
      <div className={Styles.houselist_content}>
        <h3 className={Styles.houselist_name}>{item.title}</h3>
        <div className={Styles.houselist_structure}>{item.desc}</div>
        <div className={Styles.houselist_nearby}>
          {
            item.tags.map(tags => <span key={tags}>{tags}</span>)
          }          
        </div>
        <div className={Styles.houselist_price}>{item.price}</div>
      </div>
      </div>
      </div>
     );
  }
}
 
export default HouseItem;